#include <iostream>
using namespace std;

class Point {
public:
    Point(int x, int y) : x(x), y(y) {}
    void output() {
        cout << "inner : " << x << " " << y << endl;
        return ;
    }
    friend void output(Point &);
    friend ostream &operator<<(ostream &out, const Point &p);
private:
    int x, y;
};

void output(Point &a) {
    cout << "outer : " << a.x << " " << a.y << endl;
    return ;
}

ostream &operator<<(ostream &out, const Point &p) {
    out << "Point(" << p.x << ", " << p.y << ")";
    return out;
}

int main() {
    Point p(3, 4);
    p.output();
    output(p);
    cout << p << endl;
    return 0;
}